#pragma once

#include "Resource.h"

namespace ZeEngine
{
    class SpriteSheet;
    class SpriteSheetAnimation
    {
        friend class ResourceManager;

    public:
        SpriteSheetAnimation(const std::string& strName, bool reverse, const std::vector<SDL_Rect>& frames, const std::vector<s32>& frameTimes);
        virtual ~SpriteSheetAnimation();

        bool IsReversable() const { return m_reverse; }
        u32 GetNumFrames() const { return m_numFrames; }
        const SDL_Rect GetFrameBoundary(u32 frame) const;
        const s32      GetFrameDuration(u32 frame) const;

    private:
        std::string m_name;
        bool m_reverse;
        u32  m_numFrames;
        std::vector<SDL_Rect> m_frames;
        std::vector<s32> m_frameTimes;
    };
}

